/**
 * reducer  数据处理
 * @author  姚格格
 * @date    2020-03-31 16:28
 */


import {type} from './../action';

const initialState = {
    menuName: '首页',
};
export default (state = initialState, action) => {

    //action是action文件传过来的参数
    switch (action.type) {
        case type.SWITCH_MENU:
            return {
                ...state,
                menuName: action.menuName
            };
            break;
    }

    return state
}
